home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
GAME_CGA
/
CGAGAME1.LZH
/
WIZARD.BAS
< prev
next >
Wrap
BASIC Source File
|
1983-01-21
|
28KB
|
946 lines
10 KEY OFF:CLS
20 PRINT"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
30 PRINT"░┌───────────────────────────────────┐░"
40 PRINT"░│ │░"
50 PRINT"░│ 2039-A.BAS │░"
60 PRINT"░│ THE WIZARD'S CASTLE │░"
70 PRINT"░│ │░"
80 PRINT"░│ │░"
90 PRINT"░│ BROUGHT TO YOU BY THE MEMBERS OF │░"
100 PRINT"░│ ▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄ │░"
110 PRINT"░│ █ █ █ █ █ █ │░"
120 PRINT"░│ █ █▄▄▄█ █ █ █ │░"
130 PRINT"░│ █ █ █ █ █ │░"
140 PRINT"░│ ▄▄█▄▄ █ █▄▄▄▄ █▄▄▄█ │░"
150 PRINT"░│ │░"
160 PRINT"░│ International PC Owners │░"
170 PRINT"░│ │░"
180 PRINT"░│P.O. Box 10426, Pittsburgh PA 15234│░"
190 PRINT"░│ │░"
200 PRINT"░└───────────────────────────────────┘░"
210 PRINT"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
220 PRINT
230 PRINT " PRESS ANY KEY TO CONTINUE
240 A$=INKEY$: IF A$="" THEN 240
250 CLS
1000 SAMP$="NO":GOTO 1020
1010 SAMP$="YES"
1020 CLS:WIDTH 80:KEY OFF
1030 REM *****************************************************
1040 REM * *
1050 REM * WIZARD'S CASTLE GAME FROM JULY/AUGUST 1980 *
1060 REM * ISSUE OF RECREATIONAL COMPUTING MAGAZINE *
1070 REM * WRITTEN FOR EXIDY SORCERER BY JOSEPH R. POWER *
1080 REM * MODIFIED FOR HEATH MICROSOFT BASIC BY J.F.STETSON *
1090 REM * *
1100 REM *****************************************************
1110 DEFINT A-Z
1120 DIM C$(34),I$(34),R$(4),W$(8),E$(8)
1130 DIM L(512),C(3,4),T(8),O(3),R(3)
1140 DEF FNA(Q)=1+INT(RND(1)*Q)
1150 DEF FNB(Q)=Q+8*((Q=9)-(Q=0))
1160 DEF FNC(Q)=-Q*(Q<19)-18*(Q>18)
1170 DEF FND(Q)=64*(Q-1)+8*(X-1)+Y
1180 DEF FNE(Q)=Q+100*(Q>99)
1190 Y$="** PLEASE ANSWER YES OR NO"
1200 NG=0
1210 REM
1220 REM INITIALIZE ARRAYS
1230 REM
1240 NG=NG+1
1250 Q=RND(1)
1260 RESTORE
1270 FOR Q=1 TO 34
1280 READ C$(Q),I$(Q)
1290 NEXT Q
1300 FOR Q=1 TO 512
1310 L(Q)=101
1320 NEXT Q
1330 FOR Q=1 TO 8
1340 READ W$(Q),E$(Q)
1350 NEXT Q
1360 FOR Q=1 TO 4
1370 READ R$(Q)
1380 NEXT Q
1390 IF NG > 1 GOTO 1520
1400 GOSUB 9770
1410 PRINT TAB(16);"* * * THE WIZARD'S CASTLE * * *"
1420 PRINT
1430 GOSUB 9770
1440 PRINT "MANY CYCLES AGO, IN THE KINGDOM OF N'DIC, THE GNOMIC"
1450 PRINT "WIZARD ZOT FORGED HIS GREAT *ORB OF POWER*. HE SOON"
1460 PRINT "VANISHED, LEAVING BEHIND HIS VAST SUBTERRANEAN CASTLE"
1470 PRINT "FILLED WITH ESURIENT MONSTERS, FABULOUS TREASURES, AND"
1480 PRINT "THE INCREDIBLE *ORB OF ZOT*. FROM THAT TIME HENCE, MANY"
1490 PRINT "A BOLD YOUTH HAS VENTURED INTO THE WIZARD'S CASTLE. AS"
1500 PRINT "OF NOW, *NONE* HAS EVER EMERGED VICTORIOUSLY! BEWARE!!"
1510 PRINT
1520 X=1 : Y=4
1530 L(FND(1))=2
1540 FOR Z=1 TO 7
1550 FOR Q1=1 TO 2
1560 Q=104
1570 GOSUB 9590
1580 L(FND(Z+1))=103
1590 NEXT Q1
1600 NEXT Z
1610 FOR Z=1 TO 8
1620 FOR Q=113 TO 124
1630 GOSUB 9590
1640 NEXT Q
1650 FOR Q1=1 TO 3
1660 FOR Q=105 TO 112
1670 GOSUB 9590
1680 NEXT Q
1690 Q=125
1700 GOSUB 9590
1710 NEXT Q1
1720 NEXT Z
1730 FOR Q=126 TO 133
1740 Z=FNA(8)
1750 GOSUB 9590
1760 NEXT Q
1770 Q=101
1780 FOR A=1 TO 3
1790 Z=FNA(8)
1800 GOSUB 9590
1810 C(A,1)=X
1820 C(A,2)=Y
1830 C(A,3)=Z
1840 C(A,4)=0
1850 NEXT A
1860 RC=0
1870 ST=2
1880 DX=14
1890 R$(3)="MAN"
1900 Q=112+FNA(12)
1910 Z=FNA(8)
1920 GOSUB 9590
1930 R(1)=X
1940 R(2)=Y
1950 R(3)=Z
1960 Q=109
1970 Z=FNA(8)
1980 GOSUB 9590
1990 O(1)=X
2000 O(2)=Y
2010 O(3)=Z
2020 BF=0 : OT=8 : AV=0 : HT=0 : T=1 : VF=0 : LF=0
2030 TC=0 : GP=60 : RF=0 : OF=0 : BL=0 : IQ=8 : SX=0
2040 FOR Q=1 TO 8
2050 T(Q)=0
2060 NEXT Q
2070 PRINT CHR$(7);
2080 PRINT "ALL RIGHT, BOLD ONE."
2090 PRINT "YOU MAY BE AN ELF, DWARF, MAN, OR HOBBIT."
2100 GOSUB 9830
2110 FOR Q=1 TO 4
2120 IF LEFT$(R$(Q),1)=O$ THEN RC=Q : ST=ST+2*Q : DX=DX-2*Q
2130 NEXT Q
2140 PRINT
2150 OT=OT+4*(RC=1)
2160 IF RC > 0 THEN R$(3)="HUMAN" : GOTO 2190
2170 PRINT "** THAT WAS INCORRECT. PLEASE TYPE E, D, M, OR H."
2180 GOTO 2090
2190 PRINT "WHICH SEX TO YOU PREFER";
2200 GOSUB 9850
2210 IF O$="M" THEN SX=1 : GOTO 2250
2220 IF O$="F" GOTO 2250
2230 PRINT "** CUTE ";R$(RC);", REAL CUTE. TRY M OR F."
2240 GOTO 2190
2250 PRINT
2260 PRINT "OK, ";R$(RC);", YOU HAVE THE FOLLOWING ATTRIBUTES :"
2270 PRINT "STRENGTH =";ST;" INTELLIGENCE =";IQ;" DEXTERITY =";DX
2280 PRINT "AND";OT;"OTHER POINTS TO ALLOCATE AS YOU WISH."
2290 PRINT
2300 Z$="STRENGTH"
2310 GOSUB 9880
2320 ST=ST+Q
2330 IF OT=0 GOTO 2410
2340 Z$="INTELLIGENCE"
2350 GOSUB 9880
2360 IQ=IQ+Q
2370 IF OT=0 GOTO 2410
2380 Z$="DEXTERITY"
2390 GOSUB 9880
2400 DX=DX+Q
2410 PRINT "OK, ";R$(RC);", YOU HAVE 60 GOLD PIECES (GP'S)."
2420 Z$="ARMOR"
2430 GOSUB 10130
2440 AV=0 : WV=0 : FL=0 : WC=0
2450 PRINT "PLATE<30> CHAINMAIL<20> LEATHER<10> NOTHING<0>"
2460 GOSUB 9830
2470 IF O$="N" GOTO 2530
2480 AV=-3*(O$="P")-2*(O$="C")-(O$="L")
2490 IF AV > 0 GOTO 2530
2500 PRINT
2510 PRINT "** ARE YOU A ";R$(RC);" OR ";C$(FNA(12)+12);"?"
2520 GOTO 2420
2530 AH=AV*7 : GP=GP-AV*10
2540 PRINT
2550 PRINT "OK, BOLD ";R$(RC);", YOU HAVE";GP;"GP'S LEFT."
2560 Z$="WEAPONS"
2570 GOSUB 10130
2580 PRINT "SWORD<30> MACE<20> DAGGER<10> NOTHING<0>"
2590 GOSUB 9830
2600 IF O$="N" GOTO 2660
2610 WV=-3*(O$="S")-2*(O$="M")-(O$="D")
2620 IF WV > 0 GOTO 2660
2630 PRINT
2640 PRINT "** IS YOUR IQ REALLY";IQ;"?"
2650 GOTO 2560
2660 GP=GP-WV*10
2670 IF GP < 20 GOTO 2730
2680 PRINT
2690 PRINT "DO YOU WANT TO BUY A LAMP FOR 20 GP'S";
2700 GOSUB 9850
2710 IF O$="Y" THEN LF=1 : GP=GP-20 : GOTO 2730
2720 IF O$ <> "N" THEN PRINT : PRINT Y$ : PRINT : GOTO 2690
2730 PRINT
2740 IF GP < 1 THEN Q=0 : GOTO 2850
2750 PRINT "OK, ";R$(RC);", YOU HAVE";GP;"GOLD PIECES LEFT."
2760 PRINT
2770 INPUT "FLARES COST 1 GP EACH. HOW MANY DO YOU WANT";O$
2780 Q=VAL(O$)
2790 PRINT
2800 IF Q > 0 OR ASC(O$)=48 GOTO 2840
2810 PRINT "** IF YOU DON'T WANT ANY, JUST TYPE 0 (ZERO)."
2820 PRINT
2830 GOTO 2770
2840 IF Q > GP THEN PRINT "** YOU CAN ONLY AFFORD";GP;"." : PRINT : GOTO 2770
2850 FL=FL+Q : GP=GP-Q
2860 X=1 : Y=4 : Z=1
2870 PRINT "OK, ";R$(RC);", YOU ARE NOW ENTERING THE CASTLE!"
2880 GOTO 5920
2890 REM
2900 REM MAIN PROCESSING LOOP
2910 REM
2920 T=T+1
2930 IF RF+OF > 0 GOTO 3060
2940 IF C(1,4) > T(1) THEN T=T+1
2950 IF C(2,4) > T(3) THEN GP=GP-FNA(5)
2960 IF GP < 0 THEN GP=0
2970 IF C(3,4) <= T(5) GOTO 3060
2980 A=X : B=Y : C=Z
2990 X=FNA(8) : Y=FNA(8) : Z=FNA(8)
3000 L(FND(Z))=FNE(L(FND(Z)))+100
3010 X=A : Y=B : Z=C
3020 IF L(FND(Z)) <> 1 GOTO 3060
3030 FOR Q=1 TO 3
3040 C(Q,4)=-(C(Q,1)=X)*(C(Q,2)=Y)*(C(Q,3)=Z)
3050 NEXT Q
3060 IF FNA(5) > 1 GOTO 3350
3070 PRINT
3080 PRINT "YOU ";
3090 Q=FNA(7)+BL
3100 IF Q > 7 THEN Q=4
3110 ON Q GOSUB 3270,3150,3250,3130,3290,3310,3330
3120 GOTO 3350
3130 PRINT "STEPPED ON A FROG!"
3140 RETURN
3150 PRINT "HEAR ";
3160 ON FNA(4) GOTO 3170,3190,3210,3230
3170 PRINT "A SCREAM!"
3180 RETURN
3190 PRINT "FOOTSTEPS!"
3200 RETURN
3210 PRINT "A WUMPUS!"
3220 RETURN
3230 PRINT "THUNDER!"
3240 RETURN
3250 PRINT "SNEEZED!"
3260 RETURN
3270 PRINT "SEE A BAT FLY BY!"
3280 RETURN
3290 PRINT "SMELL ";C$(12+FNA(13));" FRYING!"
3300 RETURN
3310 PRINT "FEEL LIKE YOU'RE BEING WATCHED!"
3320 RETURN
3330 PRINT "HEAR FAINT RUSTLING NOISES!"
3340 RETURN
3350 IF BL+T(4) <> 2 GOTO 3390
3360 PRINT
3370 PRINT C$(29);" CURES YOUR BLINDNESS!"
3380 BL=0
3390 IF BF+T(6) <> 2 GOTO 3430
3400 PRINT
3410 PRINT C$(31);" DISSOLVES THE BOOK!"
3420 BF=0
3430 PRINT
3440 LINE INPUT "ENTER YOUR COMMAND : ";O$
3450 IF LEFT$(O$,2)="DR" GOTO 4760
3460 O$=LEFT$(O$,1)
3470 IF O$="N" GOTO 3890
3480 IF (O$="S") OR (O$="W") OR (O$="E") GOTO 3900
3490 IF O$="U" GOTO 3950
3500 IF O$="D" GOTO 3980
3510 IF O$="M" GOTO 4030
3520 IF O$="F" THEN ON BL+1 GOTO 4260,4030
3530 IF O$="L" THEN ON BL+1 GOTO 4520,4030
3540 IF O$="O" GOTO 4950
3550 IF O$="G" THEN ON BL+1 GOTO 5390,4030
3560 IF O$="T" THEN PRINT : ON RF+1 GOTO 5650,5690
3570 IF O$="Q" GOTO 5800
3580 IF O$<>"H" GOTO 3860
3590 PRINT CHR$(27);"E"
3600 PRINT "*** WIZARD'S CASTLE COMMAND AND INFORMATION SUMMARY ***"
3610 PRINT
3620 PRINT "THE FOLLOWING COMMANDS ARE AVAILABLE :"
3630 PRINT
3640 PRINT "H/ELP N/ORTH S/OUTH E/AST W/EST U/P"
3650 PRINT "D/OWN DR/INK M/AP F/LARE L/AMP O/PEN"
3660 PRINT "G/AZE T/ELEPORT Q/UIT"
3670 PRINT
3680 PRINT "THE CONTENTS OF ROOMS ARE AS FOLLOWS :"
3690 PRINT
3700 PRINT ". = EMPTY ROOM B = BOOK C = CHEST"
3710 PRINT "D = STAIRS DOWN E = ENTRANCE/EXIT F = FLARES"
3720 PRINT "G = GOLD PIECES M = MONSTER O = CRYSTAL ORB"
3730 PRINT "P = MAGIC POOL S = SINKHOLE T = TREASURE"
3740 PRINT "U = STAIRS UP V = VENDOR W = WARP/ORB"
3750 PRINT
3760 PRINT "THE BENEFITS OF HAVING TREASURES ARE :"
3770 PRINT
3780 PRINT "RUBY RED - AVOID LETHARGY PALE PEARL - AVOID LEECH"
3790 PRINT "GREEN GEM - AVOID FORGETTING OPAL EYE - CURES BLINDNESS"
3800 PRINT "BLUE FLAME - DISSOLVES BOOKS NORN STONE - NO BENEFIT"
3810 PRINT "PALANTIR - NO BENEFIT SILMARIL - NO BENEFIT"
3820 PRINT
3830 PRINT "PRESS RETURN WHEN READY TO RESUME, ";R$(RC);".";
3840 LINE INPUT "";O$
3850 GOTO 2920
3860 PRINT
3870 PRINT "** SILLY ";R$(RC);", THAT WASN'T A VALID COMMAND!"
3880 GOTO 2920
3890 IF L(FND(Z))=2 GOTO 8960
3900 X=X+(O$="N")-(O$="S")
3910 Y=Y+(O$="W")-(O$="E")
3920 X=FNB(X)
3930 Y=FNB(Y)
3940 GOTO 5920
3950 IF L(FND(Z))=3 THEN Z=Z-1 : GOTO 5920
3960 Z$="UP"
3970 GOTO 4000
3980 Z$="DOWN"
3990 IF L(FND(Z))=4 THEN Z=Z+1 : GOTO 5920
4000 PRINT
4010 PRINT "** THERE ARE NO STAIRS GOING ";Z$;" FROM HERE!"
4020 GOTO 2920
4030 IF BL <> 1 GOTO 4100
4040 PRINT
4050 PRINT "** YOU CAN'T SEE ANYTHING, YOU DUMB ";R$(RC);"!"
4060 GOTO 2920
4070 REM
4080 REM DISPLAY MAP OF CURRENT CASTLE LEVEL
4090 REM
4100 PRINT
4110 A=X : B=Y
4120 FOR X=1 TO 8
4130 FOR Y=1 TO 8
4140 Q=L(FND(Z))
4150 IF Q > 99 THEN Q=Q-100 ' LET Q=34 TO HIDE ROOMS
4160 IF X=A AND Y=B THEN PRINT "<";I$(Q);"> "; : GOTO 4180
4170 PRINT " ";I$(Q);" ";
4180 NEXT Y
4190 PRINT
4200 PRINT
4210 NEXT X
4220 X=A : Y=B
4230 GOTO 4470
4240 PRINT ") LEVEL";Z
4250 GOTO 2920
4260 IF FL <> 0 GOTO 4320
4270 PRINT "** HEY, BRIGHT ONE, YOU'RE OUT OF FLARES!"
4280 GOTO 2920
4290 REM
4300 REM DISeADJACENT ROOM CONTENTS WITH FLARE
4310 REM
4320 PRINT
4330 FL=FL-1
4340 A=X : B=Y
4350 FOR Q1=A-1 TO A+1
4360 X=FNB(Q1)
4370 FOR Q2=B-1 TO B+1
4380 Y=FNB(Q2)
4390 Q=FNE(L(FND(Z)))
4400 L(FND(Z))=Q
4410 PRINT " ";I$(Q);" ";
4420 NEXT Q2
4430 PRINT
4440 PRINT
4450 NEXT Q1
4460 X=A : Y=B
4470 GOSUB 10160
4480 GOTO 2920
4490 REM
4500 REM DISPLAY CONTENTS OF ADJACENT ROOM WITH LAMP
4510 REM
4520 IF LF <> 0 GOTO 4560
4530 PRINT
4540 PRINT "** YOU DON'T HAVE A LAMP, ";R$(RC);"!"
4550 GOTO 2920
4560 PRINT
4570 PRINT "WHERE DO YOU WANT TO SHINE THE LAMP (N,S,E,W)";
4580 GOSUB 9850
4590 A=X : B=Y
4600 X=FNB(X+(O$="N")-(O$="S"))
4610 Y=FNB(Y+(O$="W")-(O$="E"))
4620 IF A-X+B-Y <> 0 GOTO 4660
4630 PRINT
4640 PRINT "** THAT'S NOT A DIRECTION, ";R$(RC);"!"
4650 GOTO 2920
4660 PRINT
4670 PRINT "THE LAMP SHINES INTO (";X;",";Y;") LEVEL";Z;"."
4680 PRINT
4690 L(FND(Z))=FNE(L(FND(Z)))
4700 PRINT "THERE YOU WILL FIND ";C$(L(FND(Z)));"."
4710 X=A : Y=B
4720 GOTO 2920
4730 REM
4740 REM TAKE A DRINK FROM A POOL
4750 REM
4760 IF L(FND(Z))=5 GOTO 4800
4770 PRINT
4780 PRINT "** IF YOU WANT A DRINK, FIND A POOL!"
4790 GOTO 2920
4800 Q=FNA(8)
4810 PRINT
4820 PRINT "YOU TAKE A DRINK AND ";
4830 IF Q < 7 THEN PRINT "FEEL ";
4840 ON Q GOTO 4850,4860,4870,4880,4890,4900,4910,4930
4850 ST=FNC(ST+FNA(3)) : PRINT "STRONGER." : GOTO 2920
4860 ST=ST-FNA(3) : PRINT "WEAKER." : ON (1-(ST<1)) GOTO 2920,8840
4870 IQ=FNC(IQ+FNA(3)) : PRINT "SMARTER." : GOTO 2920
4880 IQ=IQ-FNA(3) : PRINT "DUMBER." : ON (1-(IQ<1)) GOTO 2920,8840
4890 DX=FNC(DX+FNA(3)) : PRINT "NIMBLER." : GOTO 2920
4900 DX=DX-FNA(3) : PRINT "CLUMSIER." : ON (1-(DX<1)) GOTO 2920,8840
4910 Q=FNA(4) : IF Q=RC GOTO 4910
4920 RC=Q : PRINT "BECOME A ";R$(RC);"." : GOTO 2920
4930 SX=1-SX : PRINT "TURN INTO A "; : IF SX=0 THEN PRINT "FE";
4940 PRINT "MALE ";R$(RC);"!" : GOTO 2920
4950 IF L(FND(Z)) <> 6 GOTO 4990
4960 PRINT
4970 PRINT "YOU OPEN THE CHEST AND"
4980 GOTO 5250
4990 IF L(FND(Z)) <> 12 GOTO 5030
5000 PRINT
5010 PRINT "YOU OPEN THE BOOK AND"
5020 GOTO 5060
5030 PRINT
5040 PRINT "** THE ONLY THING OPENED WAS YOUR BIG MOUTH!"
5050 GOTO 2920
5060 ON FNA(6) GOTO 5070,5100,5120,5140,5170,5200
5070 PRINT "FLASH! OH NO! YOU ARE NOW A BLIND ";R$(RC);"!"
5080 BL=1
5090 GOTO 5230
5100 PRINT "IT'S ANOTHER VOLUME OF ZOT'S POETRY! - YECH!!"
5110 GOTO 5230
5120 PRINT "IT'S AN OLD COPY OF PLAY";R$(FNA(4));"!"
5130 GOTO 5230
5140 PRINT "IT'S A MANUAL OF DEXTERITY!"
5150 DX=18
5160 GOTO 5230
5170 PRINT "IT'S A MANUAL OF STRENGTH!"
5180 ST=18
5190 GOTO 5230
5200 PRINT "THE BOOK STICKS TO YOUR HANDS -"
5210 PRINT "NOW YOU ARE UNABLE TO DRAW YOUR WEAPON!"
5220 BF=1
5230 L(FND(Z))=1
5240 GOTO 2920
5250 ON FNA(4) GOTO 5260,5300,5340,5300
5260 PRINT "KABOOM! IT EXPLODES!!"
5270 Q=FNA(6)
5280 GOSUB 8740
5290 ON (1-(ST<1)) GOTO 5230,8840
5300 Q=FNA(1000)
5310 PRINT "FIND";Q;"GOLD PIECES!"
5320 GP=GP+Q
5330 GOTO 5230
5340 PRINT "GAS!! YOU STAGGER FROM THE ROOM!"
5350 L(FND(Z))=1
5360 T=T+20
5370 O$=MID$("NSEW",FNA(4),1)
5380 GOTO 3900
5390 IF L(FND(Z))=11 GOTO 5430
5400 PRINT
5410 PRINT "** IT'S HARD TO GAZE WITHOUT AN ORB!"
5420 GOTO 2920
5430 PRINT
5440 PRINT "YOU SEE ";
5450 ON FNA(6) GOTO 5460,5480,5500,5520,5590,5630
5460 PRINT "YOURSELF IN A BLOODY HEAP!"
5470 ST=ST-FNA(2) : ON (1-(ST<1)) GOTO 2920,8840
5480 PRINT "YOURSELF DRINKING FROM A POOL AND BECOMING ";C$(12+FNA(13));"!"
5490 GOTO 2920
5500 PRINT C$(12+FNA(13));" GAZING BACK AT YOU!"
5510 GOTO 2920
5520 A=X : B=Y : C=Z
5530 X=FNA(8) : Y=FNA(8) : Z=FNA(8)
5540 Q=FNE(L(FND(Z)))
5550 L(FND(Z))=Q
5560 PRINT C$(Q);" AT (";X;",";Y;") LEVEL";Z;"."
5570 X=A : Y=B : Z=C
5580 GOTO 2920
5590 A=FNA(8) : B=FNA(8) : C=FNA(8)
5600 IF FNA(8) < 4 THEN A=O(1) : B=O(2) : C=O(3)
5610 PRINT "***THE ORB OF ZOT*** AT (";A;",";B;") LEVEL";C;"!"
5620 GOTO 2920
5630 PRINT "A SOAP OPERA RERUN!"
5640 GOTO 2920
5650 IF RF <> 0 GOTO 5690
5660 PRINT
5670 PRINT "** YOU CAN'T TELEPORT WITHOUT THE RUNESTAFF!"
5680 GOTO 2920
5690 Z$="X-COORDINATE"
5700 GOSUB 9990
5710 X=Q
5720 Z$="Y-COORDINATE"
5730 GOSUB 9990
5740 Y=Q
5750 Z$="Z-COORDINATE"
5760 GOSUB 9990
5770 Z=Q
5780 O$="T"
5790 GOTO 5920
5800 PRINT
5810 PRINT "DO YOU REALLY WANT TO QUIT NOW";
5820 GOSUB 9850
5830 PRINT
5840 IF O$="Y" GOTO 5870
5850 PRINT "** THEN DON'T SAY THAT YOU DO!"
5860 GOTO 2920
5870 PRINT
5880 GOTO 9080
5890 REM
5900 REM DISPLAY STATUS INFORMATION
5910 REM
5920 PRINT
5930 IF BL=0 THEN GOSUB 10160 : PRINT
5940 PRINT "STRENGTH =";ST;" INTELLIGENCE =";IQ;" DEXTERITY =";DX
5950 PRINT "TREASURES =";TC;" FLARES =";FL;" GOLD PIECES =";GP
5960 PRINT "WEAPON = ";W$(WV+1);" ARMOR = ";W$(AV+5);
5970 IF LF=1 THEN PRINT " AND A LAMP";
5980 PRINT
5990 WC=0
6000 Q=FNE(L(FND(Z)))
6010 L(FND(Z))=Q
6020 Z$="YOU NOW HAVE"
6030 PRINT
6040 PRINT "HERE YOU FIND ";C$(Q);"."
6050 IF (Q<7) OR (Q=11) OR (Q=12) GOTO 2920
6060 IF Q=7 THEN GP=GP+FNA(10) : PRINT Z$;GP;"." : GOTO 5230
6070 IF Q=8 THEN FL=FL+FNA(5) : PRINT Z$;FL;"." : GOTO 5230
6080 IF Q > 9 GOTO 6110
6090 IF (O(1)=X) AND (O(2)=Y) AND (O(3)=Z) THEN ON (1-(O$="T")) GOTO 3900,9370
6100 X=FNA(8) : Y=FNA(8) : Z=FNA(8) : GOTO 5920
6110 IF Q=10 THEN Z=FNB(Z+1) : GOTO 5920
6120 IF Q <= 25 OR Q >= 34 GOTO 6180
6130 PRINT
6140 PRINT "IT'S NOW YOURS!"
6150 T(Q-25)=1
6160 TC=TC+1
6170 GOTO 5230
6180 A=L(FND(Z))-12
6190 WC=0
6200 IF (A<13) OR (VF=1) GOTO 7390
6210 PRINT
6220 PRINT "YOU MAY TRADE WITH, ATTACK, OR IGNORE THE VENDOR."
6230 GOSUB 9830
6240 IF O$="I" GOTO 2920
6250 IF O$ <> "A" GOTO 6300
6260 VF=1
6270 PRINT
6280 PRINT "YOU'LL BE SORRY THAT YOU DID THAT!"
6290 GOTO 7390
6300 IF O$="T" GOTO 6340
6310 PRINT
6320 PRINT "** NICE SHOT, ";R$(RC);"!"
6330 GOTO 6210
6340 FOR Q=1 TO 8
6350 A=FNA(Q*1500)
6360 IF T(Q)=0 GOTO 6420
6370 PRINT
6380 PRINT "DO YOU WANT TO SELL ";C$(Q+25);" FOR";A;"GP'S";
6390 GOSUB 9850
6400 IF O$="Y" THEN TC=TC-1 : T(Q)=0 : GP=GP+A : GOTO 6420
6410 IF O$ <> "N" THEN PRINT Y$ : GOTO 6370
6420 NEXT Q
6430 IF GP >= 1000 GOTO 6470
6440 PRINT
6450 PRINT "YOU'RE TOO POOR TO TRADE, ";R$(RC);"."
6460 GOTO 2920
6470 IF GP < 1250 GOTO 6970
6480 PRINT
6490 PRINT "OK, ";R$(RC);", YOU HAVE";GP;"GP'S AND ";W$(AV+5);" ARMOR."
6500 PRINT
6510 Z$="ARMOR"
6520 GOSUB 10130
6530 PRINT "NOTHING<0> LEATHER<1250> ";
6540 IF GP > 1499 THEN PRINT "CHAINMAIL<1500> ";
6550 IF GP > 1999 THEN PRINT "PLATE<2000>";
6560 PRINT
6570 GOSUB 9830
6580 PRINT
6590 IF O$="N" GOTO 6720
6600 IF O$="L" THEN GP=GP-1250 : AV=1 : AH=7 : GOTO 6720
6610 IF O$ <> "C" OR GP >= 1500 GOTO 6640
6620 PRINT "** YOU HAVEN'T GOT THAT MUCH CASH ON HAND!"
6630 GOTO 6500
6640 IF O$="C" THEN GP=GP-1500 : AV=2 : AH=14 : GOTO 6720
6650 IF O$ <> "P" OR GP >= 2000 GOTO 6680
6660 PRINT "** YOU CAN'T AFFORD PLATE ARMOR!"
6670 GOTO 6500
6680 IF O$="P" THEN GP=GP-2000 : AV=3 : AH=21 : GOTO 6720
6690 PRINT
6700 PRINT "** DON'T BE SILLY. CHOOSE A SELECTION."
6710 GOTO 6560
6720 IF GP < 1250 GOTO 6970
6730 PRINT
6740 PRINT"YOU HAVE";GP;"GP'S LEFT WITH ";W$(WV+1);" IN HAND."
6750 PRINT
6760 Z$="WEAPON"
6770 GOSUB 10130
6780 PRINT "NOTHING<0> DAGGER<1250> ";
6790 IF GP > 1499 THEN PRINT "MACE<1500> ";
6800 IF GP > 1999 THEN PRINT "SWORD<2000>";
6810 PRINT
6820 GOSUB 9830
6830 PRINT
6840 IF O$="N" GOTO 6970
6850 IF O$="D" THEN GP=GP-1250 : WV=1 : GOTO 6970
6860 IF O$ <> "M" OR GP >= 1500 GOTO 6890
6870 PRINT "** SORRY SIR, I'M AFRAID I DON'T GIVE CREDIT!"
6880 GOTO 6750
6890 IF O$="M" THEN GP=GP-1500 : WV=2 : GOTO 6970
6900 IF O$ <> "S" OR GP >= 2000 GOTO 6940
6910 PRINT "** YOUR DUNGEON EXPRESS CARD - ";
6920 PRINT "YOU LEFT HOME WITHOUT IT!"
6930 GOTO 6750
6940 IF O$="S" THEN GP=GP-2000 : WV=3 : GOTO 6970
6950 PRINT "** TRY CHOOSING A SELECTION!"
6960 GOTO 6810
6970 IF GP < 1000 GOTO 2920
6980 Z$="STRENGTH"
6990 GOSUB 10070
7000 IF O$ <> "Y" GOTO 7060
7010 GP=GP-1000
7020 ST=FNC(ST+FNA(6))
7030 Q=ST
7040 GOSUB 10100
7050 GOTO 6970
7060 IF O$ <> "N" THEN PRINT Y$ : GOTO 6980
7070 IF GP < 1000 GOTO 2920
7080 Z$="INTELLIGENCE"
7090 GOSUB 10070
7100 IF O$ <> "Y" GOTO 7160
7110 GP=GP-1000
7120 IQ=FNC(IQ+FNA(6))
7130 Q=IQ
7140 GOSUB 10100
7150 GOTO 7070
7160 IF O$ <> "N" THEN PRINT Y$ : GOTO 7080
7170 IF GP < 1000 GOTO 2920
7180 Z$="DEXTERITY"
7190 GOSUB 10070
7200 IF O$ <> "Y" GOTO 7260
7210 GP=GP-1000
7220 DX=FNC(DX+FNA(6))
7230 Q=DX
7240 GOSUB 10100
7250 GOTO 7170
7260 IF O$ <> "N" THEN PRINT Y$ : GOTO 7180
7270 IF (GP<1000) OR (LF=1) GOTO 2920
7280 PRINT
7290 PRINT "DO YOU WANT TO BUY A LAMP FOR 1000 GP'S";
7300 GOSUB 9850
7310 IF O$ <> "Y" GOTO 7370
7320 GP=GP-1000
7330 LF=1
7340 PRINT
7350 PRINT "IT'S GUARANTEED TO OUTLIVE YOU!"
7360 GOTO 2920
7370 IF O$ <> "N" THEN PRINT Y$ : GOTO 7280
7380 GOTO 2920
7390 Q1=1+INT(A/2) : Q2=A+2 : Q3=1
7400 IF (C(1,4)>T(1)) OR (BL=1) OR (DX<FNA(9)+FNA(9)) GOTO 8420
7410 PRINT
7420 PRINT "YOU'RE FACING ";C$(A+12);"!"
7430 PRINT
7440 PRINT "YOU MAY ATTACK OR RETREAT."
7450 IF Q3=1 THEN PRINT "YOU CAN ALSO ATTEMPT A BRIBE."
7460 IF IQ > 14 THEN PRINT "YOU CAN ALSO CAST A SPELL."
7470 PRINT
7480 PRINT "YOUR STRENGTH IS";ST;"AND YOUR DEXTERITY IS";DX;"."
7490 GOSUB 9830
7500 IF O$ <> "A" GOTO 7910
7510 IF WV <> 0 GOTO 7550
7520 PRINT
7530 PRINT "** POUNDING ON ";C$(A+12);" WON'T HURT IT!"
7540 GOTO 8420
7550 IF BF <> 1 GOTO 7590
7560 PRINT
7570 PRINT "** YOU CAN'T BEAT IT TO DEATH WITH A BOOK!"
7580 GOTO 8420
7590 IF DX >= FNA(20)+(3*BL) GOTO 7630
7600 PRINT
7610 PRINT "YOU MISSED, TOO BAD!"
7620 GOTO 8420
7630 Z$=RIGHT$(C$(A+12),LEN(C$(A+12))-2)
7640 IF LEFT$(Z$,1)=" " THEN Z$=MID$(Z$,2)
7650 PRINT
7660 PRINT "YOU HIT THE EVIL ";Z$;"!"
7670 Q2=Q2-WV
7680 IF (A <> 9 AND A <> 12) GOTO 7730
7690 IF FNA(8) <> 1 GOTO 7730
7700 PRINT
7710 PRINT "OH NO! YOUR ";W$(WV+1);" BROKE!"
7720 WV=0
7730 IF Q2 > 0 GOTO 8420
7740 PRINT
7750 MC=MC-1
7760 PRINT C$(A+12);" LIES DEAD AT YOUR FEET!"
7770 IF H > T-60 GOTO 7810
7780 PRINT
7790 PRINT "YOU SPEND AN HOUR EATING ";C$(A+12);E$(FNA(8));"."
7800 H=T
7810 IF X <> R(1) OR Y <> R(2) OR Z <> R(3) THEN ON (1-(A=13)) GOTO 7860,9630
7820 PRINT
7830 PRINT "GREAT ZOT! YOU'VE FOUND THE RUNESTAFF!";CHR$(7)
7840 R(1)=0
7850 RF=1
7860 Q=FNA(1000)
7870 PRINT
7880 PRINT "YOU NOW GET HIS HOARD OF";Q;"GP'S"
7890 GP=GP+Q
7900 GOTO 5230
7910 IF O$="R" GOTO 8420
7920 IF O$ <> "C" GOTO 8210
7930 IF IQ >= 15 OR Q3 <= 1 GOTO 7970
7940 PRINT
7950 PRINT "** YOU CAN'T CAST A SPELL NOW!"
7960 GOTO 7410
7970 PRINT
7980 PRINT "WHICH SPELL (WEB, FIREBALL, DEATHSPELL)";
7990 GOSUB 9850
8000 PRINT
8010 IF O$ <> "W" GOTO 8050
8020 ST=ST-1
8030 WC=FNA(8)+1
8040 ON (1-(ST<1)) GOTO 8420,8840
8050 IF O$ <> "F" GOTO 8140
8060 Q=FNA(7)+FNA(7)
8070 ST=ST-1
8080 IQ=IQ-1
8090 IF (IQ < 1) OR (ST < 1) GOTO 8840
8100 PRINT "IT DOES";Q;"POINTS WORTH OF DAMAGE."
8110 PRINT
8120 Q2=Q2-Q
8130 GOTO 7730
8140 IF O$="D" GOTO 8180
8150 PRINT
8160 PRINT "** TRY ONE OF THE OPTIONS GIVEN."
8170 GOTO 7410
8180 PRINT "DEATH . . . ";
8190 IF IQ < FNA(4)+15 THEN PRINT "YOURS!" : IQ=0 : GOTO 8840
8200 PRINT "HIS!" : Q2=0 : GOTO 7740
8210 IF O$="B" AND Q3 <= 1 GOTO 8250
8220 PRINT
8230 PRINT "** CHOOSE ONE OF THE OPTIONS LISTED."
8240 GOTO 7410
8250 IF TC <> 0 GOTO 8290
8260 PRINT
8270 PRINT "ALL I WANT IS YOUR LIFE!"
8280 GOTO 8420
8290 Q=FNA(8)
8300 IF T(Q)=0 GOTO 8290
8310 PRINT
8320 PRINT "I WANT ";C$(Q+25);". WILL YOU GIVE IT TO ME";
8330 GOSUB 9850
8340 IF O$="N" GOTO 8420
8350 IF O$ <> "Y" THEN PRINT Y$ : GOTO 8310
8360 T(Q)=0
8370 TC=TC-1
8380 PRINT
8390 PRINT "OK, JUST DON'T TELL ANYONE ELSE."
8400 VF=VF+(L(FND(Z))=25)
8410 GOTO 2920
8420 Q3=2
8430 IF WC <= 0 GOTO 8460
8440 WC=WC-1
8450 IF WC=0 THEN PRINT : PRINT "THE WEB JUST BROKE!"
8460 Z$=RIGHT$(C$(A+12),LEN(C$(A+12))-2)
8470 IF LEFT$(Z$,1)=" " THEN Z$=MID$(Z$,2)
8480 IF WC <= 0 GOTO 8520
8490 PRINT
8500 PRINT "THE ";Z$;" IS STUCK AND CAN'T ATTACK NOW!"
8510 GOTO 8630
8520 PRINT
8530 PRINT "THE ";Z$;" ATTACKS!"
8540 IF DX < FNA(7)+FNA(7)+FNA(7)+3*BL GOTO 8580
8550 PRINT
8560 PRINT "WHAT LUCK, HE MISSED YOU!"
8570 GOTO 8630
8580 PRINT
8590 PRINT "OUCH! HE HIT YOU!"
8600 Q=Q1
8610 GOSUB 8740
8620 IF ST < 1 GOTO 8840
8630 IF O$ <> "R" GOTO 7410
8640 PRINT
8650 PRINT "YOU HAVE ESCAPED!"
8660 PRINT
8670 PRINT "DO YOU WANT TO GO NORTH, SOUTH, EAST, OR WEST";
8680 GOSUB 9850
8690 IF O$="N" OR O$="S" OR O$="E" OR O$="W" GOTO 3900
8700 PRINT
8710 PRINT "** DON'T PRESS YOUR LUCK, ";R$(RC);"!"
8720 PRINT
8730 GOTO 8670
8740 IF AV=0 GOTO 8820
8750 Q=Q-AV
8760 AH=AH-AV
8770 IF Q < 0 THEN AH=AH-Q : Q=0
8780 IF AH >= 0 GOTO 8820
8790 AH=0 : AV=0
8800 PRINT
8810 PRINT "YOUR ARMOR HAS BEEN DESTROYED . . . GOOD LUCK!"
8820 ST=ST-Q
8830 RETURN
8840 PRINT CHR$(7)
8850 GOSUB 9770
8860 PRINT "A NOBLE EFFORT, OH FORMERLY LIVING ";R$(RC);"!"
8870 PRINT
8880 PRINT "YOU DIED DUE TO LACK OF ";
8890 IF ST < 1 THEN PRINT "STRENGTH."
8900 IF IQ < 1 THEN PRINT "INTELLIGENCE."
8910 IF DX < 1 THEN PRINT "DEXTERITY."
8920 PRINT
8930 Q3=1
8940 PRINT "AT THE TIME YOU DIED, YOU HAD :"
8950 GOTO 9130
8960 Q3=0
8970 PRINT
8980 PRINT "YOU LEFT THE CASTLE WITH";
8990 IF OF=0 THEN PRINT "OUT";
9000 PRINT " THE ORB OF ZOT."
9010 PRINT
9020 IF OF=0 GOTO 9080
9030 PRINT
9040 PRINT "AN INCREDIBLY GLORIOUS VICTORY!!"
9050 PRINT
9060 PRINT "IN ADDITION, YOU GOT OUT WITH THE FOLLOWING :"
9070 GOTO 9120
9080 PRINT
9090 PRINT "A LESS THAN AWE-INSPIRING DEFEAT."
9100 PRINT
9110 PRINT "WHEN YOU LEFT THE CASTLE, YOU HAD :"
9120 IF Q3=0 THEN PRINT "YOUR MISERABLE LIFE!"
9130 FOR Q=1 TO 8
9140 IF T(Q)=1 THEN PRINT C$(Q+25)
9150 NEXT Q
9160 PRINT W$(WV+1);" AND ";W$(AV+5);
9170 IF LF=1 THEN PRINT " AND A LAMP";
9180 PRINT
9190 PRINT "YOU ALSO HAD";FL;"FLARES AND";GP;"GOLD PIECES"
9200 IF RF=1 THEN PRINT "AND THE RUNESTAFF"
9210 PRINT
9220 PRINT "AND IT TOOK YOU";T;"TURNS!"
9230 PRINT
9240 PRINT "ARE YOU FOOLISH ENOUGH TO WANT TO PLAY AGAIN";
9250 GOSUB 9850
9260 PRINT
9270 IF O$ <> "Y" THEN GOTO 9330
9280 PRINT "SOME ";R$(RC);"S NEVER LEARN!"
9290 PRINT
9300 PRINT "PLEASE BE PATIENT WHILE THE CASTLE IS RESTOCKED."
9310 PRINT
9320 GOTO 1240
9330 IF O$ <> "N" THEN PRINT Y$ : GOTO 9240
9340 PRINT "MAYBE DUMB ";R$(RC);" IS NOT SO DUMB AFTER ALL!"
9350 PRINT
9360 GOTO 10180
9370 PRINT
9380 PRINT "GREAT UNMITIGATED ZOT!"
9390 PRINT
9400 PRINT "YOU JUST FOUND ***THE ORB OF ZOT***!"
9410 PRINT
9420 PRINT "THE RUNESTAFF HAS DISAPPEARED!"
9430 RF=0
9440 OF=1
9450 O(1)=0
9460 GOTO 5230
9470 DATA AN EMPTY ROOM,.,THE ENTRANCE,E,STAIRS GOING UP,U
9480 DATA STAIRS GOING DOWN,D,A POOL,P,A CHEST,C,GOLD PIECES,G
9490 DATA FLARES,F,A WARP,W,A SINKHOLE,S,A CRYSTAL ORB,O
9500 DATA A BOOK,B,A KOBOLD,M,AN ORC,M,A WOLF,M,A GOBLIN,M,AN OGRE,M
9510 DATA A TROLL,M,A BEAR,M,A MINOTAUR,M,A GARGOYLE,M,A CHIMERA,M
9520 DATA A BALROG,M,A DRAGON,M,A VENDOR,V,THE RUBY RED,T
9530 DATA THE NORN STONE,T,THE PALE PEARL,T,THE OPAL EYE,T
9540 DATA THE GREEN GEM,T,THE BLUE FLAME,T,THE PALANTIR,T,THE SILMARIL,T
9550 DATA X,"?",NO WEAPON," SANDWICH"
9560 DATA DAGGER," STEW",MACE," SOUP",SWORD," BURGER",NO ARMOR," ROAST"
9570 DATA LEATHER," FILET",CHAINMAIL," TACO",PLATE," PIE"
9580 DATA HOBBIT,ELF,MAN,DWARF
9590 X=FNA(8) : Y=FNA(8)
9600 IF L(FND(Z)) <> 101 GOTO 9590
9610 L(FND(Z))=Q
9620 RETURN
9630 PRINT
9640 PRINT "YOU GET ALL HIS WARES :"
9650 PRINT "PLATE ARMOR"
9660 AV=3 : AH=21
9670 PRINT "A SWORD"
9680 WV=3
9690 PRINT "A STRENGTH POTION"
9700 ST=FNC(ST+FNA(6))
9710 PRINT "AN INTELLIGENCE POTION"
9720 IQ=FNC(IQ+FNA(6))
9730 PRINT "A DEXTERITY POTION"
9740 DX=FNC(DX+FNA(6))
9750 IF LF=0 THEN PRINT "A LAMP" : LF=1
9760 GOTO 7860
9770 FOR Q=1 TO 64
9780 PRINT "*";
9790 NEXT Q
9800 PRINT
9810 PRINT
9820 RETURN
9830 PRINT
9840 PRINT "YOUR CHOICE";
9850 INPUT O$
9860 O$=LEFT$(O$,1)
9870 RETURN
9880 PRINT "HOW MANY POINTS DO YOU WISH TO ADD TO YOUR ";Z$;
9890 INPUT O$
9900 PRINT
9910 Q=VAL(O$)
9920 IF Q=0 AND ASC(O$) <> 48 THEN Q=-1
9930 IF Q<0 OR Q>OT OR Q<>INT(Q) THEN PRINT "** "; : GOTO 9880
9940 OT=OT-Q
9950 RETURN
9960 INPUT O$
9970 Q=INT(VAL(O$))
9980 RETURN
9990 PRINT
10000 PRINT Z$;
10010 INPUT O$
10020 Q=INT(VAL(O$))
10030 IF Q > 0 AND Q < 9 THEN RETURN
10040 PRINT
10050 PRINT "** TRY A NUMBER FROM 1 TO 8."
10060 GOTO 9990
10070 PRINT
10080 PRINT "DO YOU WANT TO BUY A POTION OF ";Z$;" FOR 1000 GP'S";
10090 GOTO 9850
10100 PRINT
10110 PRINT "YOUR ";Z$;" IS NOW";Q;"."
10120 RETURN
10130 PRINT
10140 PRINT "THESE ARE THE TYPES OF ";Z$;" YOU CAN BUY :"
10150 RETURN
10160 PRINT "YOU ARE AT (";X;",";Y;") LEVEL";Z;"."
10170 RETURN
10180 IF SAMP$="YES" THEN CHAIN "SAMPLES",1000 ELSE END
N
10160 PRINT "YO